require('page/common/top/index.js');
var _account_service = require('service/account-service.js');
var catalogMain = {

    init : function(){
        this.bindEvents();
        this.loadAccountInfo();
        return this;
    },
    bindEvents : function(){
    },
    loadAccountInfo : function(){
        _account_service.checkLogin(
            function(res){
                console.log("欢迎光临");
                $('#welcome').text('欢迎您的光临,'+res.username +'!');
            },
            function(errMsg){
                console.log("未获取登录");
                $('#welcome').text('');
            }
        );

    }
};
module.exports = catalogMain.init();
